<?php
include('../../config.php');
/**
 * Created by PhpStorm.
 * User: 明哲
 * Date: 2016/4/27
 * Time: 13:50
 */
    $rows=$mysql->query("select * from `product` order by id DESC");
//    $rows = json_decode($rows,true);
//    if($rows){
//        foreach($rows as $row){
//            echo "<tr><td>{$row['id']}</td><td>{$row['name']}</td><td>{$row['type']}</td><td>{$row['time']}</td><td>
//                                    <a href='#'><i class='fa fa-edit'></i></a>&nbsp&nbsp&nbsp<a href='#'><i class='fa fa-times product-del' title='{$row['id']}'></i></a></td></tr>";
//        }
//    }
////draw: 表示请求次数
//
//recordsTotal: 总记录数
//
//recordsFiltered: 过滤后的总记录数
//
//data: 具体的数据对象数组
//$rs['data'] = $rows;
//$rs['draw'] = $rows;
//$rs['recordsTotal'] = $rows;
//$rs['recordsFiltered'] = $rows;
    $rows = json_encode($rows);
    echo $rows;
